Skip to content

feat: chainable extended HTTP assertions on the builder#16

Merged
tugkanboz merged 1 commit into
mainfrom
feature/chainable-assertions
Jun 3, 2026
Merged

feat: chainable extended HTTP assertions on the builder#16
tugkanboz merged 1 commit into
mainfrom
feature/chainable-assertions

Conversation

@tugkanboz

Copy link
Copy Markdown
Member

Closes #15.

The extended HTTP assertions (expectClientError, expectJsonSchema, expectJsonContains, expectCookie, expectSorted, and the rest) are now chainable on the thenable request builder, not only on a resolved GoResponse. They queue and replay on the response like the core assertions.

  • http-assertions.js installs queueing wrappers on RequestBuilder.prototype for each method, excluding expectValue (returns an Expectation, so response-only).
  • client.d.ts updated; new unit test; CHANGELOG.

633 unit tests green, tsc clean.

http-assertions.js now also installs queueing wrappers on RequestBuilder for the
extended assertions, so they can be chained before awaiting and replay on the
resolved response. expectValue is excluded since it returns an Expectation.
Types and a unit test added.
@tugkanboz tugkanboz merged commit 56c7103 into main Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make extended HTTP assertions chainable on the request builder

1 participant